

/**
 * @author Administrator
 *
 */
import java.awt.*;
import java.awt.event.*;
import java.net.*;
import java.util.*;
import javax.swing.*;

public class ToolBar extends Box {
  
  ToolBar(ToolList actions) {
    super(BoxLayout.Y_AXIS);
    ToolListIterator iter = actions.iterator();
    while(iter.hasNext()) {
      Action a = (Action) iter.next();
      JButton button = new JButton((Icon) a.getValue(Action.DEFAULT));
      button.setToolTipText((String) a.getValue(Action.SHORT_DESCRIPTION));
      button.addActionListener(a);
      add(button);
    }
    add(Box.createVerticalGlue());
  }
} 
